From: Florian Müllner Date: Mon, 1 Aug 2022 13:13:06 +0000 (+0200) Subject: status/network: Give bluetooth its own category X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~126 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=73f4bb13d0d1f0f4b9c447bd7f5d402a43c03f64;p=gnome-shell.git status/network: Give bluetooth its own category In the quick settings future, each device type will use a separate toggle. We still have a long way to go, but start with giving bluetooth its own section/category. Baby steps … Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 5e0c05634..8b08dd56b 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -24,6 +24,7 @@ const NMConnectionCategory = { INVALID: 'invalid', WIRED: 'wired', WIRELESS: 'wireless', + BLUETOOTH: 'bluetooth', WWAN: 'wwan', VPN: 'vpn', }; @@ -564,7 +565,7 @@ var NMBluetoothDeviceItem = class extends NMDeviceItem { } get category() { - return NMConnectionCategory.WWAN; + return NMConnectionCategory.BLUETOOTH; } _getDescription() { @@ -1544,6 +1545,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection { case NMConnectionCategory.WIRED: return 'network-wired-symbolic'; case NMConnectionCategory.WIRELESS: + case NMConnectionCategory.BLUETOOTH: case NMConnectionCategory.WWAN: return 'network-wireless-symbolic'; } @@ -1560,6 +1562,11 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection { return ngettext("%s Wi-Fi Connection", "%s Wi-Fi Connections", nDevices).format(nDevices); + case NMConnectionCategory.BLUETOOTH: + return ngettext( + '%s Bluetooth Connection', + '%s Bluetooth Connections', + nDevices).format(nDevices); case NMConnectionCategory.WWAN: return ngettext("%s Modem Connection", "%s Modem Connections", @@ -1588,7 +1595,7 @@ class Indicator extends PanelMenu.SystemIndicator { this._ctypes = { }; this._ctypes[NM.SETTING_WIRED_SETTING_NAME] = NMConnectionCategory.WIRED; this._ctypes[NM.SETTING_WIRELESS_SETTING_NAME] = NMConnectionCategory.WIRELESS; - this._ctypes[NM.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.WWAN; + this._ctypes[NM.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.BLUETOOTH; this._ctypes[NM.SETTING_CDMA_SETTING_NAME] = NMConnectionCategory.WWAN; this._ctypes[NM.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN; this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN; @@ -1614,6 +1621,7 @@ class Indicator extends PanelMenu.SystemIndicator { const categories = [ NMConnectionCategory.WIRED, NMConnectionCategory.WIRELESS, + NMConnectionCategory.BLUETOOTH, NMConnectionCategory.WWAN, ]; for (let category of categories) {